﻿using Eassets.Data.Asset;
using Eassets.Layered.Domain.Asset;
using System.Collections.ObjectModel;

namespace Eassets.Service.Asset
{

    public class CategoryService
    {
        private CategoryData categoryData = new CategoryData();


        public void InsertItem(Category category)
        {
            //categoryData.Insert
        }

        public void AddCategory(Category category)
        {

            CategoryData catagoryData = new CategoryData();
            catagoryData.Insert(category);
        }

        /// <summary>
        /// Updates an item.
        /// </summary>
        public void UpdateCategory(Category category)
        {
            categoryData.Update(category);
        }

        /// <summary>
        /// Deletes an item.
        /// </summary>
        public void DeleteCategory(long categoryId)
        {
            categoryData.Delete(categoryId);
        }

        public Category GetAssetCategoryById(long ProductCategoryId)
        {
            CategoryData productCatagoryData = new CategoryData();
            return productCatagoryData.GetAssetCategoryById(ProductCategoryId);
        }
        public Collection<Category> GetAllAssetCategory()
        {
            CategoryData catagoryData = new CategoryData();

            return catagoryData.GetAllAssetCategory();
        }

    }
}
